<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <!-- <script src="https://cdn.bootcdn.net/ajax/libs/axios/0.19.2/axios.js"></script> -->
    <script src="./myAjax.js"></script>
</head>
<body>
    <button>发送请求</button>
    <script>
        let btn = document.querySelector('button')
        btn.addEventListener('click',()=>{
            myAjax('get','http://127.0.0.1:8081/name',{name:'xuexue',age:18},0,(res)=>{
                alert(res)
                encodeURI
                decodeURI
            })
        })
    </script>
</body>
</html>